package com.newblog.factory;

import java.sql.Connection;

import com.newblog.dao.UserDAO;
import com.newblog.dao.UserDAOMysql;

public class UserFactory {
	private static UserFactory factory;
	private Connection conn;
	private UserDAO userDao;
	private UserFactory(){
		this.conn = DB.getConn();
		userDao = new UserDAOMysql(this.conn);
	}
	public static UserFactory getInstance(){
		if(factory==null)
			factory = new UserFactory();
		return factory;
	}
	public UserDAO createUserDao(){
		return this.userDao;
	}
	
	

}
